package com.gym.openapi.dao;

import com.gym.openapi.entity.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;
/**
 *@author:ming
 *@Date: 2021/11/26
 *@description:角色管理
 */
public interface RoleMapper {

    /**
     *@author:ming
     *@Date: 2021/11/24
     *@description:模糊查询名字
     */
    List<Role> getRoleWithName(@Param("name") String name);
/**
 *@author:ming
 *@Date: 2021/11/24
 *@description:中间表
 */
    List<Integer> getRoleMenu(@Param("roleId") Integer roleId);

    void delMenuByRoleId(@Param("roleId") Integer roleId);

    void insertMenus(@Param("roleId") Integer roleId, @Param("menuIds") Integer[] menuIds);



    int deleteByPrimaryKey(Integer id);

    int insert(Role record);

    int insertSelective(Role record);

    Role selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);
}